
        /*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package miscelaneas_tipos_genericos;
import java.util.Set;
import java.util.TreeSet;
/**
 *
 * @author user
 */
public class pruebacomparable {
    public static void main(String[] args){
        Set <persona> lista=new TreeSet<persona>();
        lista.add(new persona("Juan",25));
        lista.add(new persona("Alberto",30));
        lista.add(new persona("Ivan",40));
        lista.add(new persona("Angel",35));
        System.out.println(lista);
    }
    
}
